package com.example.zhujftest.hik.test;

import java.text.MessageFormat;

public class MessageFmt {

	public static void main(String[] args) {
		/*String str = "{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}{12}{13}{14}{15}{16}";  
		Object[] array = new Object[]{"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q"};  
		String value = MessageFormat.format(str, array);  
		System.out.println(value); // ABCDEFGHIJKLMNOPQ  
*/		  
		  
		/*String message = "oh, {0} is a {1} person";  
		Object[] array = new Object[]{"ZhangSan","lisi"};  
		String value = MessageFormat.format(message, array);  
		System.out.println(value); // oh, ZhangSan is a person  
*/		  
		  
		/*String message = "oh, {0,number,#.#} is a number";  
		Object[] array = new Object[]{new Double(3.1415)};  
		String value = MessageFormat.format(message, array);  
		System.out.println(value); // oh, 3.1 is a number  
*/	  
		/*String str = "{0} | {1} | {0} | {1}";  
		Object[] array = new Object[] { "A", "B" };  
		String value = MessageFormat.format(str, array);  
		System.out.println(value); // A | B | A | B  
*/	
		
		String value = MessageFormat.format("1111", null, "");
		System.out.println(value);
	}
}
